package com.ytkj.digitalConstruction.rabbit;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = "hello")
public class Receiver {

	private static final Logger log = LoggerFactory.getLogger(Receiver.class);

	@RabbitListener(queues = "hello.queue1")
	public String processMessage1(String msg) {
		log.info(Thread.currentThread().getName() + " 接收到来自hello.queue1队列的消息：" + msg);
		return msg.toUpperCase();
	}

}
